<%@ page pageEncoding="utf-8" isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>校园超市管理系统</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/jsp/css/public.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/jsp/css/style.css"/>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/js/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/icon.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/jsp/js/bootstrap/css/bootstrap.min.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/jsp/js/jQuery1.11.1.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
    <%--  <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.pagination.js"></script>--%>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/js/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">
       var  loginOut;
       $(function () {
           //获取当前登录用户名
           $.ajax({
               url: "${pageContext.request.contextPath}/getUsername",
               type: "post",
               success: function (data) {
                   $("#usernameOne").html(data.data);
                   $("#usernameTwo").html(data.data);
               }
           });
           loginOut=function userLoginOut() {
               $.messager.confirm("温馨提示", "确定要退出吗？", function (r) {
                   if (r) {
                       location.href="${pageContext.request.contextPath}/loginout";
                   } else {
                       return false;
                   }

               });
           }
       })
    </script>
</head>
<body>
<!--头部-->
<header class="publicHeader">
    <h1>校园超市管理系统</h1>

    <div class="publicHeaderR">
        <p><span>您好！</span><span style="color: #fff21b" id="usernameOne"></span> , 欢迎你！</p>
        <%--<a href="${pageContext.request.contextPath}/loginout">退出</a>--%>
    </div>
</header>
<!--时间-->
<section class="publicTime">
    <span id="time">2015年1月1日 11:11  星期一</span>
    <a href="#">温馨提示：为了能正常浏览，请使用高版本浏览器！（IE10+）</a>
</section>
<!--主体内容-->
<section class="publicMian">
    <div class="left">
        <h2 class="leftH2">
            <span class="span_gn">功能列表</span>
        </h2>
        <nav>
            <ul class="list">
                <li><a href="${pageContext.request.contextPath}/jsp/productList.jsp">商品管理</a></li>
                <li><a href="${pageContext.request.contextPath}/jsp/billList.jsp">订单管理</a></li>
                <li><a href="${pageContext.request.contextPath}/jsp/providerList.jsp">供应商管理</a></li>
                <li><a href="${pageContext.request.contextPath}/jsp/userList.jsp">用户管理</a></li>
                <li><a href="${pageContext.request.contextPath}/jsp/password.jsp">密码修改</a></li>
                <%--<li><a href="${pageContext.request.contextPath}/loginout">退出系统</a></li>--%>
                <li><a onclick="loginOut()">退出系统</a></li>
            </ul>
        </nav>
    </div>
    <div class="right">
        <img class="wColck" src="${pageContext.request.contextPath}/jsp/img/clock.jpg" alt=""/>
        <div class="wFont">
            <h2 id="usernameTwo">${username}</h2>
            <p>欢迎来到超市管理系统!</p>
        </div>
    </div>
</section>
<footer class="footer">
    版权归本超市所有
</footer>
<script src="${pageContext.request.contextPath}/jsp/js/time.js"></script>
</body>
</html>